
from model_upanddown import download
download() #下载模型

from flask import Flask,request
from prediction import predict
app = Flask(__name__)

@app.route('/')
def hello():
    return "Hello, World!"

@app.route('/name')
def greet():
    name = request.args.get('n')  #前端可通过url/name?n=[你输入的名字传参]
    print (f"Hello, {name}!")
    return predict(name)



if __name__ == '__main__':
    app.run(host='0.0.0.0',port=5000)